<?php

/* @var $this \yii\web\View */
/* @var $content string */

use backend\assets\WenmingAsset;
use yii\helpers\Html;
use backend\components\Menu;
use yii\helpers\Url;
use common\models\Notice;

WenmingAsset::register($this);
$WenmingAssetUrl=$this->getAssetManager()->getBundle(WenmingAsset::className())->baseUrl;
?>
<?php $this->beginPage() ?>
<!DOCTYPE HTML>
<html>
<head>
<title>微信群管理系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- basic styles -->
<?php $this->head() ?>
<style>
#chartdiv {
  width: 100%;
  height: 295px;
}
</style>
</head>

<body class="cbp-spmenu-push">
	<?php $this->beginBody() ?>
    <div class="main-content">
	<div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
		<!--left-fixed -navigation-->
		<aside class="sidebar-left">
      <nav class="navbar navbar-inverse">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".collapse" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            </button>
            <h1><a class="navbar-brand" href="index.html"><span class="dashboard_text"></span></a></h1>
          </div>
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <?php
                if(isset(Yii::$app->session['adminuser']))
                {
                    $menus=Yii::$app->session['adminuser']->role->getMenusArray();
                    echo Menu::widget([
                        'options' => [
                            'class' => 'sidebar-menu',
                            'id' => 'side-menu'
                        ],
                        'items' =>  $menus,
                    ]);
                }
        
            
            ?>
            </ul>
          </div>
          <!-- /.navbar-collapse -->
      </nav>
    </aside>
	</div>
		<!--left-fixed -navigation-->
		
		<!-- header-starts -->
		<div class="sticky-header header-section ">
			<div class="header-left">
				<!--toggle button start-->
				<button id="showLeftPush"><i class="fa fa-bars"></i></button>
				<!--toggle button end-->
				<div class="profile_details_left"><!--notifications of menu start -->
					<ul class="nofitications-dropdown">
						<li class="dropdown head-dpdn">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-envelope"></i><span class="badge">1</span></a>
							<ul class="dropdown-menu">
								<li>
									<div class="notification_header">
										<h3>你有1条新消息</h3>
									</div>
								</li>
								
								<li>
									<a href="javascript:void(0)">
										<div class="notification_desc">
											<p>test123</p>
											<p><span>2018年6月20日</span></p>
										</div>
										<div class="clearfix"></div>	
									</a>
								</li>
								
								<li>
									<div class="notification_bottom">
										<a href="javascript:void(0)">查看所有信息</a>
									</div> 
								</li>
							</ul>
						</li>
						
					</ul>
					<div class="clearfix"> </div>
				</div>
				<!--notification menu end -->
				<button class="newicon" style="background-color:#4EEE94;margin-left:8px"><i class="fa fa-comments"></i></button>
				<button class="newicon" style="background-color:#B0E2FF;margin-left:16px"><a href="javascript:void(0)"><i class="fa fa-home"></i></a></button>
				
				<div class="clearfix"> </div>

				
			</div>
			<div class="header-right">
				<div class="profile_details">		
					<ul>
						<li class="dropdown profile_details_drop">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
								<div class="profile_img">	
									<span class="prfil-img"><img src="<?=$WenmingAssetUrl;?>/images/2.jpg" alt=""> </span> 
									<div class="user-name">
										<p><?=$_SESSION['adminuser']['username']?></p>
										<span>管理员</span>
									</div>
									<i class="fa fa-angle-down lnr"></i>
									<i class="fa fa-angle-up lnr"></i>
									<div class="clearfix"></div>	
								</div>	
							</a>
							<ul class="dropdown-menu drp-mnu">
								<!--<li> <a href="#"><i class="fa fa-cog"></i> 设置</a> </li> 
								<li> <a href="#"><i class="fa fa-user"></i> 帐户</a> </li> 
								<li> <a href="#"><i class="fa fa-suitcase"></i> 简介</a> </li> -->
								<li> <a href="<?=Url::toRoute(['/admin/login/logout']);?>"><i class="fa fa-sign-out"></i> 注销</a> </li>
							</ul>
						</li>
					</ul>
				</div>
				<div class="clearfix"> </div>				
			</div>
			<div class="clearfix"> </div>	
		</div>
		<!-- //header-ends -->
		<!-- main content start-->
		<div id="page-wrapper"  style="min-height: 800px;">
			<div class="main-page">
			  <div class="tables">
                <?php $route = isset($_GET['op'])?'index?op='.$_GET['op']:'index'; ?>
			    <h2 class="title1"><a class="agile-icon" href="<?=Url::toRoute([$route]); ?>"><i class="fa fa-home"></i>返回列表页</a></h2>
				  <div class="bs-example widget-shadow ov" data-example-id="contextual-table"> 
						<?=$content?>
			    </div>
				</div>
			</div>
		</div>
	<!--footer-->
	<div class="footer" style="position: fixed;bottom: 0;">
	   <p>&copy; 2018 版权归舜网所有|  <a href="javascript:void(0)">济南文明城市管理大数据平台</a></p>
	</div>
    <!--//footer-->
	</div>
	

    <?php $this->endBody() ?>
    <?php $this->beginBlock('js') ?>
	
	$('#page-wrapper').attr('style','min-height:'+(window.screen.height-100)+'px');
				var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
				showLeftPush = document.getElementById( 'showLeftPush' ),
				body = document.body;
        showLeftPush.onclick = function() {
            classie.toggle( this, 'active' );
            classie.toggle( body, 'cbp-spmenu-push-toright' );
            classie.toggle( menuLeft, 'cbp-spmenu-open' );
            disableOther( 'showLeftPush' );
        };
			

        function disableOther( button ) {
            if( button !== 'showLeftPush' ) {
                classie.toggle( showLeftPush, 'disabled' );
            }
        }
        $('.sidebar-menu').SidebarNav();
		function chat()
		{
			layer.open({
				type: 2,
				title:'聊天',
				closeBtn: 1, //不显示关闭按钮
				shadeClose: true,
				shade: false,
				area: ['950px', '600px'],
				maxmin: true, //开启最大化最小化按钮
				content: '<?=Url::toRoute(['/admin/chat/index'])?>', //iframe的url，no代表不显示滚动条
			
			});
		}
    <?php $this->endBlock() ?>
    <?php $this->registerJs($this->blocks['js'], \yii\web\View::POS_END); ?>
</body>
</html>
<?php $this->endPage() ?>